class HomeController < ApplicationController
  def index
    @music = music
  end
  
  def music
    songs = Song.find(:all)
    
    #albums
    albums = songs.collect(&:album).sort.uniq!
    artists = songs.collect(&:artist).sort.uniq!
    
    parsed = {
      :albums => albums,
      :artists => artists,
      :songs => songs
    }
    
    return parsed
  end
end
